package com.heima.controller;


import com.heima.pojo.TbRole;
import com.heima.service.ITbRoleService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 用户角色表 前端控制器
 * </p>
 *
 * @author nan
 * @since 2024-06-06
 */
@RestController
@RequestMapping("/api/user-service/role")
public class TbRoleController {

    @Autowired
    private ITbRoleService roleService;

    @GetMapping
    @ApiOperation("角色列表")
    public List<TbRole> getAllRole() {
        return roleService.list();
    }

}
